package gui;

import javax.swing.*;

import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.*;

/**
 * @author Matthias
 *
 */
public class AdmMenu extends JPanel {
	
	private JLabel lbl_Header;
	private JButton btn_Logout;
	private JButton btn_CreateUser;
	private JButton btn_DeleteUser;
	private JButton btn_ViewUser;
	private JButton btn_EditUser;
	
	public AdmMenu() {
		
		setPreferredSize(new Dimension(550, 400));
		setLayout(null);
		
		lbl_Header = new JLabel("Administrator Menu");
		lbl_Header.setFont(new Font("SansSerif", Font.BOLD, 26));
		lbl_Header.setBounds(157, 40, 249, 34);
		add(lbl_Header);
		
		btn_Logout = new JButton("Logout");
		btn_Logout.setFont(new Font("SansSerif", Font.PLAIN, 16));
		btn_Logout.setBounds(119, 300, 120, 40);
		add(btn_Logout);
		
		btn_CreateUser = new JButton("Create User");
		btn_CreateUser.setFont(new Font("SansSerif", Font.PLAIN, 16));
		btn_CreateUser.setBounds(119, 117, 120, 40);
		add(btn_CreateUser);
		
		btn_DeleteUser = new JButton("Delete User");
		btn_DeleteUser.setFont(new Font("SansSerif", Font.PLAIN, 16));
		btn_DeleteUser.setBounds(321, 117, 120, 40);
		add(btn_DeleteUser);
		
		btn_ViewUser = new JButton("View User");
		btn_ViewUser.setFont(new Font("SansSerif", Font.PLAIN, 16));
		btn_ViewUser.setBounds(321, 173, 120, 40);
		add(btn_ViewUser);
		
		btn_EditUser = new JButton("Edit User");
		btn_EditUser.setFont(new Font("SansSerif", Font.PLAIN, 16));
		btn_EditUser.setBounds(119, 174, 120, 40);
		add(btn_EditUser);
	}
	
	public JButton getCreate(){
		return btn_CreateUser;
	}
	
	public JButton getAdmEdit(){
		return btn_EditUser;
	}
	
	public JButton getDelete(){
		return btn_DeleteUser;
	}
	
	public JButton getView(){
		return btn_ViewUser;
	}
	
	public JButton getLogout(){
		return btn_Logout;
	}
	
	public JButton getEdit(){
		return btn_EditUser;
	}
	
	public void addActionListener(ActionListener event) {
		btn_Logout.addActionListener(event);
		btn_CreateUser.addActionListener(event);
		btn_DeleteUser.addActionListener(event);
		btn_ViewUser.addActionListener(event);
		btn_EditUser.addActionListener(event);
	}
}
